import type { Key } from 'ant-design-vue/es/vc-tree/interface';

import type { DefResourceModel } from './defResourceModel';

export namespace DefApplicationModel {
  export interface ApplicationResourceResultVO {
    defApplication: DefApplicationModel.DefApplicationResultVO;
    resourceList: DefResourceModel.DefResourceResultVO[];
    allKeys: Key[];
  }

  export interface DefApplicationResultVO {
    appKey?: string;
    appSecret?: string;
    name: string;
    version?: string;
    type?: string;
    introduce?: string;
    remark?: string;
    url?: string;
    isVisible?: boolean;
    isGeneral?: boolean;
    sortValue?: number;
    id: string;
    createdBy?: string;
    createdTime?: string;
    updatedBy?: string;
    updatedTime?: string;
    redirect?: string;
    echoMap?: any;
    // 扩展字段
    expirationTime: string;
    state: string;
  }

  export interface DefApplicationPageQuery {
    appKey?: string;
    appSecret?: string;
    name?: string;
    version?: string;
    type?: string;
    introduce?: string;
    remark?: string;
    redirect?: string;
    url?: string;
    isVisible?: boolean;
    sortValue?: number;
    id?: string;
  }

  export interface DefApplicationSaveVO {
    appKey?: string;
    appSecret?: string;
    name?: string;
    version?: string;
    type?: string;
    introduce?: string;
    redirect?: string;
    remark?: string;
    url?: string;
    isVisible?: boolean;
    isGeneral?: boolean;
    sortValue?: number;
  }

  export interface DefApplicationUpdateVO {
    id?: string;
    appKey?: string;
    appSecret?: string;
    name?: string;
    version?: string;
    type?: string;
    introduce?: string;
    redirect?: string;
    remark?: string;
    url?: string;
    isVisible?: boolean;
    isGeneral?: boolean;
    sortValue?: number;
  }
}
